package lab02.test17;

/**
 * Created by ASUS on 2017/10/26.
 */
public class Test {
    public static void main(String[] args) {
        int[] numbers=new int[5];
        numbers[0]=13;
        numbers[1]=9;
        numbers[2]=85;
        numbers[3]=32;
        numbers[4]=25;
int index;
for (index=0;index<numbers.length;index++)
    System.out.println(numbers[index]);

        int i,max=0;
        for (i=0;i<numbers.length;i++){
            if (numbers[i] > max) {
           max=numbers[i]; }
            }
        System.out.println("max is "  +max);
        int min=max;
        for (i=0;i<numbers.length;i++){
            if (numbers[i] < min) {
           min=numbers[i]; }
            }
        System.out.println("min is "  +min);
        int sum=0;
        for(int t=0;t<numbers.length;t++)
        sum+=numbers[t];
        System.out.println("sum is " +sum);
        }

    }

